<#include "/layout/layout.ftl">
<#import "/layout/macro.ftl" as macro>
<#import "/layout/select.ftl" as my/>
<#assign css>
<#--此ftl中用到的css-->
</#assign>
<#assign js>
<#--此ftl中用到的js-->
<script>
	$(".btn-submit").click(function () {
		// 校验表单合法
		var bootstrapValidator = $(".form-edit").data('bootstrapValidator');
		bootstrapValidator.validate();
		if(bootstrapValidator.isValid()){
			$.ajax({
				type: "POST",
				url: "/adminScoreManagentment/edit",
				data: $(".form-edit").serialize(),
				dataType: "JSON",
				success: function(res){
					layer.msg(res.message, {time: 2000
					}, function(){
						location.href="/adminScoreManagentment/edit";
					});
				}
			});
		}else{
			return false;
		}
	});

	$('.form-edit').bootstrapValidator({
		message: '请输入有效值',
		feedbackIcons: {
			valid: 'glyphicon glyphicon-ok',
			invalid: 'glyphicon glyphicon-remove',
			validating: 'glyphicon glyphicon-refresh'
		}
	});

</script>
</#assign>
<@layout title="编辑" active="adminScoreManagentment">
<!-- Content Header (Page header) -->
<section class="content-header">
	<h1>
		<#if isAdd>
            新增
        <#else>
            编辑
        </#if>
		<small>骑手评分规则详细信息</small>
	</h1>
	<ol class="breadcrumb">
		<li><a href="/"><i class="fa fa-home"></i> 管理后台</a></li>
		<li><a href="#"><i class="fa fa-list-ul"></i> 骑手评分规则管理</a></li>
		<li class="active"><i class="fa fa-edit"></i>
		    <#if isAdd>
                新增
            <#else>
                编辑
            </#if>
		</li>
	</ol>
</section>
<!-- Main content -->
<section class="content">
	<div class="row">
		<div class="col-md-12">
			<!-- Default box -->
			<div class="box  box-primary">
				<form class="form-horizontal form-edit" method="post" action="adminScoreManagentment/edit">
					<div class="box-body">
						<input type="hidden" id="id" name="id" value="${adminScoreManagentment.id!}">
						<input type="hidden" id="isAdd" name="isAdd" value="${isAdd?string('true','false')}">
						<span style="font-size: 20px;font-weight: bold">基本分值设置</span>
						<div class="form-group">
							<label class="col-sm-2 control-label">完成订单评分：</label>
							<div class="col-sm-10">
								<input  id="completeOrderScore" name="completeOrderScore" class="form-control" type="text" value="${adminScoreManagentment.completeOrderScore!}" >
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">师傅默认分值：</label>
							<div class="col-sm-10">
								<input  id="defaultScore" name="defaultScore" class="form-control" type="text" value="${adminScoreManagentment.defaultScore!}" >
								<#--								<input required placeholder="请输入评分规则类型" id="type" name="type" class="form-control" type="text" value="${adminScoreManagentment.type!}" >-->
							</div>
						</div>
<#--						<div class="form-group">-->
<#--							<label class="col-sm-2 control-label">奖励</label>-->
<#--&lt;#&ndash;							<div class="col-sm-10">&ndash;&gt;-->
<#--&lt;#&ndash;								<input required placeholder="请输入分值设定" id="score" name="score" class="form-control" type="text" value="${adminScoreManagentment.score!}" >&ndash;&gt;-->
<#--&lt;#&ndash;							</div>&ndash;&gt;-->
<#--						</div>-->
						<span style="font-size: 20px;font-weight: bold">奖励分值设置</span>
						<div class="form-group">
							<label class="col-sm-2 control-label">好评评分：</label>
							<div class="col-sm-10">
								<input id="goodScore" name="goodScore" class="form-control" type="text" value="${adminScoreManagentment.goodScore!}" >
							</div>
<#--							<div class="col-sm-10">-->
<#--								<input required placeholder="请输入分值设定" id="score" name="score" class="form-control" type="text" value="${adminScoreManagentment.score!}" >-->
<#--							</div>-->
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">周达到订单评分：</label>
							<div class="col-sm-2">
								<label class="control-label">订单数：</label>
								<input id="weekGoalNum" name="weekGoalNum" class="form-control" type="text" value="${adminScoreManagentment.weekGoalNum!}" >
							</div>
							<div class="col-sm-2">
								<label class="control-label">评分：</label>
								<input  id="weekGoalScore" name="weekGoalScore" class="form-control" type="text" value="${adminScoreManagentment.weekGoalScore!}" >
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">深夜服务评分：</label>
							<div class="col-sm-10">
									<input id="nightScore" name="nightScore" class="form-control" type="text" value="${adminScoreManagentment.nightScore!}" >
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">特殊天气评分：</label>
							<div class="col-sm-10">
								<input id="specialWeatherScore" name="specialWeatherScore" class="form-control" type="text" value="${adminScoreManagentment.specialWeatherScore!}" >
							</div>
						</div>
						<span style="font-size: 20px;font-weight: bold">惩罚分值设置</span>

						<div class="form-group">
							<label class="col-sm-2 control-label">系统派单不接：</label>
							<div class="col-sm-10">
								<input  id="sysOrderRefuseScore" name="sysOrderRefuseScore" class="form-control" type="text" value="${adminScoreManagentment.sysOrderRefuseScore!}" >
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">收到投诉,投诉认定合理：</label>
							<div class="col-sm-10">
								<input id="complainRationalScore" name="complainRationalScore" class="form-control" type="text" value="${adminScoreManagentment.complainRationalScore!}" >
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">超时10分钟：</label>
							<div class="col-sm-10">
								<input  id="nightScore" name="timeoutTenScore" class="form-control" type="text" value="${adminScoreManagentment.timeoutTenScore!}" >
							</div>
						</div>
						<span style="font-size: 20px;font-weight: bold">评分区间设置</span>

						<div class="form-group">
							<label class="col-sm-2 control-label">星级1区间：</label>
							<div class="col-sm-2">
								<input  id="oneStarScoreBegin" name="oneStarScoreBegin" class="form-control" type="text" value="${adminScoreManagentment.oneStarScoreBegin!}" >
							</div>
							<div class="col-sm-2">
								<input  id="oneStarScoreEnd" name="oneStarScoreEnd" class="form-control" type="text" value="${adminScoreManagentment.oneStarScoreEnd!}" >
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">星级2区间：</label>
							<div class="col-sm-2">
								<input id="twoStarScoreBegin" name="twoStarScoreBegin" class="form-control" type="text" value="${adminScoreManagentment.twoStarScoreBegin!}" >
							</div>
							<div class="col-sm-2">
								<input  id="twoStarScoreEnd" name="twoStarScoreEnd" class="form-control" type="text" value="${adminScoreManagentment.twoStarScoreEnd!}" >
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">星级3区间：</label>
							<div class="col-sm-2">
								<input id="trdStarScoreBegin" name="trdStarScoreBegin" class="form-control" type="text" value="${adminScoreManagentment.trdStarScoreBegin!}" >
							</div>
							<div class="col-sm-2">
								<input  id="trdStarScoreEnd" name="trdStarScoreEnd" class="form-control" type="text" value="${adminScoreManagentment.trdStarScoreEnd!}" >
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">星级4区间：</label>
							<div class="col-sm-2">
								<input  id="forStarScoreBegin" name="forStarScoreBegin" class="form-control" type="text" value="${adminScoreManagentment.forStarScoreBegin!}" >
							</div>
							<div class="col-sm-2">
								<input  id="forStarScoreEnd" name="forStarScoreEnd" class="form-control" type="text" value="${adminScoreManagentment.forStarScoreEnd!}" >
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">星级5区间：</label>
							<div class="col-sm-2">
								<input  id="fveStarScoreBegin" name="fveStarScoreBegin" class="form-control" type="text" value="${adminScoreManagentment.fveStarScoreBegin!}" >
							</div>
							<div class="col-sm-2">
								<input id="fveStarScoreEnd" name="fveStarScoreEnd" class="form-control" type="text" value="${adminScoreManagentment.fveStarScoreEnd!}" >
							</div>
						</div>

					<div class="box-footer">
						<button type="button" class="btn btn-info pull-left btn-submit">提交</button>
					</div>

				</form>
			</div>
			<!-- /.box -->
		</div>
	</div>
</section>
<!-- /.content -->
</@layout>
